/************************************************************************/
/*																		*/
/*		School Hangover Project											*/
/*																		*/
/*		IMAC 2010														*/
/*		Author : 	Helena Duchaussoy									*/
/*					Isabelle Gouwy										*/
/*					Nathalie Kuoch										*/
/*					Franck Letellier									*/
/*					Louise Pequignot									*/
/*																		*/
/*		E-mail: flo-in-underware@googlegroups.com						*/
/*																		*/
/************************************************************************/
#ifndef __CLUE_H__
#define __CLUE_H__

#include "InteractiveObject.h"
#include "Player.h"

class Clue : public InteractiveObject {

public:
	Clue();
	Clue(lua_State* L);
	~Clue();
	
	void update();

	void init();

	int load(lua_State* L);
	int setImg(lua_State* L);
	int setClueID(lua_State* L);

	inline std::string getImg() {return m_simgFile;}
	inline int getClueID() {return m_iclueID;}

	inline bool getRemove() {return m_bremove;}
	inline void setRemove(bool rem) {m_bremove = rem;}

private:
	std::string m_simgFile;
	int m_iclueID;
	bool m_bremove;

	KeyboardState* m_pkeyState;

	friend class Lunar<Clue>;
	static const char className[];
	static Lunar<Clue>::RegType methods[];

};

// Callback class to handle keyboard event
class ClueActionCallback : public osg::NodeCallback {

public:
	ClueActionCallback(KeyboardState* keyState, Clue* clue) {
		m_pkeyState = keyState;
		m_pclue = clue;
	}

	virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);

protected:
	KeyboardState* m_pkeyState;
	Clue* m_pclue;
};

#endif // __CLUE_H__
